using Windows.UI.Xaml;

namespace RockHopper.TrainingCalculator.WinRT.Controls
{
    public static class DependencyPropertyDescriptor
    {
        public static DependencyProperty CreateProperty<TControl, TType>(
            string name, 
            TType defaultValue = default (TType), 
            PropertyChangedCallback changedCallback = null)
        {
            return DependencyProperty.Register(name, typeof(TType), typeof(TControl), new PropertyMetadata(defaultValue, changedCallback));
        }

        public static DependencyProperty CreateAttached<TControl, TType>(string name)
        {
            return DependencyProperty.RegisterAttached(name, typeof(TType), typeof(TControl), new PropertyMetadata(default(TType)));
        }
    }
}